<?php 

    ///Передаем массивы стран и языков    
    $arrc = sfCultureInfo::getInstance(sfContext::getInstance()->getUser()->getCulture())->getCountries();
    $arrl = sfCultureInfo::getInstance(sfContext::getInstance()->getUser()->getCulture())->getLanguages();    
    ////

?>


    <h1 class="title_page_right">
   	  <img class="floatleft" src="/images/title_page_left.png" alt="" />
      Search results
    </h1> 
	<div class="clear content clearfix">
    
    <?php if ($user->getResults()): ?>
    
                <div class="serch_box_otstup">
                    <div class="floatleft">    
                    <?php echo __('Founds') ?> <?php echo $user->getNbResults() ?> <?php echo __('profiles') ?>   <br /> 
                    <?php echo link_to(__('Another serch'),'@home','class="arrow_b"')?>    
                    </div>
                    
                    <div class="floatright filtr_menu">
					                    <?php echo link_to(__('All'),'@search?all=true','class="curent"') ?>
					                    <?php echo link_to(__('User on-line'),'@search'.$sf_request->params2str(array('is_online'=>'1')),'class="curent"') ?>
					                    <?php echo link_to(__('New'),'@search?is_new=1','class="curent"') ?>
                    </div>
                    <div class="clear user_descr_tab">
                        <span <?php if($adv) {echo 'class="but_gray_right"';}else{echo 'class="but_red_right"';}?> >
                             <a <?php if($adv) {echo 'class="but_gray_left"';}else{echo 'class="but_red_left"';}?> <?php if(!$adv) echo ' href="'.url_for('@home').'"'?>>General</a>
                        </span>
                        <span <?php if(!$adv) {echo 'class="but_gray_right"';}else{'class="but_red_right"';}?>>
                             <a <?php if(!$adv) {echo 'class="but_gray_left"';}else{'class="but_red_left"';}?> <?php if(!$adv) echo ' href="'.url_for('search/advform').'"'?>>Advansed</a>                       
                        </span>
                    </div>
                </div>


                
 
             
                
  
               <?php foreach ($user->getResults() as $v	): ?>
                
                <div class="user_block_inner clearfix">
                      <div align="center" class="user_block_left_coll">
                            <!--Фотку резать по ширине = 128px -->
                            <span class="photo_ramka_lr photo_user_otstup" align="left">
                                <a href="<?php echo url_for('profile/show?id='.$v->getId())?>">
                                    <img src="/images/photo_ramka_t.png" class="photo_ramka_t" />
                                    <img class="photo_user" src="<?php echo $v->getUrlAvatar() ?>" alt="" />
                                    <img src="/images/photo_ramka_b.png" class="photo_ramka_b" />
                                </a>
                            </span>
                            <!--*Фотка -->
                            <!--"on_line" "off_line" -->
                            <?php if ($v->getIsOnline()=='true'):?>
                            <div class="on_line"></div>
                            <?php else: ?>
                            <div class="off_line"></div>
                            <?php endif; ?>
                            
                        </div>
                        
                      <div class="user_block_right_coll">
                      <div class="user_block_right_otstup2 clearfix">	
                          <div class="more_descr_user">
                          <a href="<?php echo url_for('profile/show?id='.$v->getId())?>" class="more_about_link">More about <?php echo $v ?>:</a>
                          <table><tr>
                          <td><?php echo __('Рост')?></td> <td><?php echo $v->getHeight() ?></td>
                          </tr>
                          <tr>
                          <td><?php echo __('Вес')?></td> <td><?php echo $v->getVes() ?></td>
                          </tr>
                          <tr>
                          <td><?php echo __('Возраст')?></td> <td><?php echo $v->getAge() ?></td>
                          </tr></table>
                          </div>
                          
                          <div class="more_descr_user">
                          <span class="more_about_link"><?php echo __('About me') ?></span>
                          <table><tr>
                          <td></td> <td> <?php echo mb_substr($v->getAboutMe(),0,200,'utf-8') ?>...</td>
                          </tr>
                         </table>
                          </div>
                      </div>
                      
                      <div class="icons_str clear">
                      	<ins class="thumbnail">
                            <div class="r">                             
                                   <?php echo link_to(image_tag('/images/icons/ico_wink.png'),'@smile?id='.$v->getId()) ?>
                                <div class="item_name"><?php echo link_to(__('Подмигнуть'),'@smile?id='.$v->getId())?></div>
                            </div>
                        </ins>    
                        <ins class="thumbnail">
                            <div class="r">
                                   <?php echo link_to(image_tag('/images/icons/ico_ph_album.png','title="'.__('Фотоальбомы').'"'), '@user_gallery_list?id='.$v->getId()) ?>
                                <div class="item_name"><?php echo link_to(__('Фотоальбомы'), '@user_gallery_list?id='.$v->getId())?></div>
                            </div>
                        </ins>
                        <ins class="thumbnail">
                            <div class="r">
                                   <?php echo link_to(image_tag('/images/icons/ico_add.png','title="'.__('Добавить в друзья').'"'), '@fav_add?id='.$v->getId()) ?>
                                <div class="item_name"><?php echo link_to(__('Добавить в друзья'), '@fav_add?id='.$v->getId())?></div>
                            </div>
                        </ins>
                        <ins class="thumbnail">
                            <div class="r">
                                    <?php echo link_to(image_tag('/images/icons/ico_mail.png','title="'.__('Написать сообщение').'"'),'@mailbox_send?id='.$v->getId())?>
                                <div class="item_name"><?php echo link_to(__('Написать сообщение'),'@mailbox_send?id='.$v->getId())?></div>
                            </div>
                        </ins>
                        <ins class="thumbnail">
                            <div class="r">
                                   <?php echo link_to(image_tag('/images/icons/ico_movies.png','title="'.__('Видеоролики').'"'), '@show_profile?id='.$v->getId()) ?>
                                <div class="item_name"><?php echo link_to(__('Видеоролики'), '@video_list?id='.$v->getId())?></div>
                            </div>
                        </ins>
                        <ins class="thumbnail">
                            <div class="r">
                                   <?php echo link_to(image_tag('/images/icons/ico_gifts.png','title="'.__('Подарки').'"'), '@gift_category?id_to='.$v->getId()) ?>
                                <div class="item_name"><?php echo link_to(__('Подарки'), '@gift_category?id_to='.$v->getId())?></div>
                            </div>
                        </ins>
                        
                         <?php if ($v->getIsOnline()=='true'):?>
                        <ins class="thumbnail">
                            <div class="r">
		                           <a href="<?= url_for('chat/call?id='.$v->getId())?>"><?php echo image_tag('/images/icons/ico_call_chat.png','title="'.__('Пригласить в чат').'"') ?></a>
                                <div class="item_name">


		                           		<a href="<?= url_for('chat/call?id='.$v->getId())?>"><span><?php echo __('Пригласить в чат') ?></span></a>
                         		
                         		</div>
                            </div>
                        </ins>
                        <?php endif; ?>
                        
                                                                                    	
                      </div>
                      </div>
                </div>
    			<?php endforeach ?>
                
                <?php include_partial('global/common/'.sfConfig::get('app_name').'/pager', array('pager'=>$user)) ?>
                

                
                 <?php else: ?>

 
				 <div class="alert"><?php echo __('Результатов не найдено')?></div>
				 
				 <?php endif ?>
                
    </div>